package org.carabiner.util;

/**
 * Defines a base class for String enumerations. String enumerations can be used
 * in place of <code>public final static String ...</code> declatations and
 * allow for more control of what values may be passed to a method. For example
 * a method that looks up a value in a map but should have values within a
 * specific set. Using an implementation of AbstractEnumeration allows you to
 * enforce that set of allowable key values.
 * 
 * Without String Enumeration Class: public String getValue( String key ) // any
 * string may be passed in.
 * 
 * public String getValue( AbstractEnumeration enumeration ) // requires that //
 * an instance of AbstractEnumeration be passed in. More specifically // one
 * could require an instance of a specific implementation of // abstract
 * enumeration allowing for consderably more control than // would be provided
 * by just the String accessor.
 * 
 * <p>
 * Carabiner Testing Framework
 * </p>
 * <p>
 * Copyright: <a href="http://www.gnu.org/licenses/gpl.html">GNU Public License</a>
 * </p>
 * 
 * @author John Januskey (john.januskey@gmail.com)
 * 
 */
public abstract class AbstractEnumeration
{
  private String enumerationName;

  /**
   * Initializes a new instance of the <code>AbstractEnumeration</code> class.
   * 
   * @param name
   *          String
   */
  protected AbstractEnumeration(String name)
  {
    enumerationName = name;
  }

  public String toString()
  {
    return enumerationName;
  }
}
